from nextpy_org import styles
from nextpy_org.templates import template
import nextpy as xt

@template(route="Badge", title="4Components", description="5")
def badge() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/badge.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Code", title="4Components", description="5")
def code() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/code.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Divider", title="4Components", description="5")
def divider() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/divider.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="DataTable", title="4Components", description="5")
def datatable() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/datatable.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="DataEditor", title="4Components", description="5")
def dataeditor() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/dataeditor.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="List", title="4Components", description="5")
def list() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/list.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Stat", title="4Components", description="5")
def stat() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/stat.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Table", title="4Components", description="5")
def table() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/datadisplay/table.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)